'use strict';

const mongoose = require('mongoose');
const Schema = mongoose.Schema;

const schema = new Schema({
  real_name: {
    type: String,
    unique: true
  },
  phone: String,
  password: String
});

// options
schema.set('timestamps', true); // createAt, updatedAt -> UTC
schema.set('minimize', false);
schema.set('collection', 'user')


const db = require('../config/db');
module.exports = db.main.model('user', schema);
